<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            margin: 0;padding: 0
        }
        section{
            width: 1000px;
            height: 400px;
            border: 1px solid #000;
        }
        div{
            width: 100px;
            height: 200px;
            background: #000;
            transition: 3s
        }
        p{
            width: 100px;
            height: 200px;
            background: red;
            transition: 3s ease-in-out
            /* 默认是逐渐慢下来 */
        }
        section:hover div,section:hover p{
            width: 100%;
        }

    </style>
</head>
<body>
    <section>
        <div></div>
        <p></p>
    </section>
</body>
</html>